// 云函数入口文件
const cloud = require('wx-server-sdk')

cloud.init({
  env:"mupp-5gs2863z7cf6873f"
})

// 云函数入口函数
exports.main = async (event, context) => {
  const wxContext = cloud.getWXContext()
  const db = cloud.database()
  const comment = db.collection('comment')
  const _ = db.command
  console.log(event);
  let res = comment.where({
    _id:event._id
}).update({
    data:{
      dz:event.dz,
    }
})


  return {
    res
  }
}